<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="com.lmpop.trade.ti_shipping.*" %>
<%@ page import="java.util.*" %>
<% 
  	String shipping_id="";
  	if(request.getParameter("shipping_id")!=null) shipping_id = request.getParameter("shipping_id");
  	Ti_shippingInfo ti_shippingInfo = new Ti_shippingInfo();
  	List list = ti_shippingInfo.getListByPk(shipping_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	
  	String cust_id="",ship_name="",ship_desc="",is_pay="",is_enable="",area_attr="",arrive_fare="",free_fare="",con_fare="",first_fare="",one_fare="",cal_type="",in_date="";
  	if(map.get("cust_id")!=null) cust_id = map.get("cust_id").toString();
  	if(map.get("ship_name")!=null) ship_name = map.get("ship_name").toString();
  	if(map.get("ship_desc")!=null) ship_desc = map.get("ship_desc").toString();
  	if(map.get("is_pay")!=null) is_pay = map.get("is_pay").toString();
  	if(map.get("is_enable")!=null) is_enable = map.get("is_enable").toString();
  	if(map.get("area_attr")!=null) area_attr = map.get("area_attr").toString();
  	if(map.get("arrive_fare")!=null) arrive_fare = map.get("arrive_fare").toString();
  	if(map.get("free_fare")!=null) free_fare = map.get("free_fare").toString();
  	if(map.get("con_fare")!=null) con_fare = map.get("con_fare").toString();
  	if(map.get("first_fare")!=null) first_fare = map.get("first_fare").toString();
  	if(map.get("one_fare")!=null) one_fare = map.get("one_fare").toString();
  	if(map.get("cal_type")!=null) cal_type = map.get("cal_type").toString();
  	//if(map.get("in_date")!=null) in_date = map.get("in_date").toString();
  	in_date=new Date().toLocaleString();

	String shipname = "";
	if(request.getParameter("shipname")!=null && !request.getParameter("shipname").equals("")){
		shipname = new String(request.getParameter("shipname").trim().getBytes("utf-8"));
	}
	String ienable = "";
	if(request.getParameter("ienable")!=null && !request.getParameter("ienable").equals("")){
		ienable = request.getParameter("ienable");
	}
	String ipay = "";
	if(request.getParameter("ipay")!=null && !request.getParameter("ipay").equals("")){
		ipay = request.getParameter("ipay");
	}
	String start_date="";
	if(request.getParameter("start_date")!=null && !request.getParameter("start_date").equals("")){
		start_date = request.getParameter("start_date");
	}
	String end_date = "";
	if(request.getParameter("end_date")!=null && !request.getParameter("end_date").equals("")){
		end_date = request.getParameter("end_date");
	}		
	String iStart = "0";
	if(request.getParameter("iStart")!=null && !request.getParameter("iStart").equals("")){
		iStart = request.getParameter("iStart");
	}
	
	String url = "/program/admin/shopping/index.jsp?shipname="+shipname+"&ienable="+ienable+"&ipay="+ipay+"&start_date="+start_date+"&end_date="+end_date+"&iStart="+iStart;
  %>
<html>
  <head>
    
    <title>ti_shipping Manager</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="shipping.js"></script>
	<script type="text/javascript" src="/program/admin/js/judgment.js" charset="UTF-8"></script> 
</head>

<body>

  
	
	<h1>修改配送方式</h1>
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table width="100%" cellpadding="1" cellspacing="1" border="0" class="listtab">
		

		<input name="cust_id" id="cust_id" value="<%=cust_id %>" type="hidden" />
	
		
		<tr>
			<td align="right" width="15%">
				配送方式名称<font color="red">*</font>
			</td>
			<td align="left" width="20%"><input name="ship_name" id="ship_name" value="<%=ship_name%>" type="text" onkeyup="inputNoHorns(this)"   onbeforepaste= "inputNoHorns(this); " /></td>
			<td align="right" width="15%">
				启用状态:
			</td>
			<td width="20%">
				<input name="is_enable" id="is_enable" value="0" type="radio" <%if(is_enable.equals("0")) out.print("checked");%> />启用
				<input name="is_enable" id="is_enable" value="1" type="radio" <%if(is_enable.equals("1")) out.print("checked");%> />禁用
			</td>
			
		</tr>
		
		<tr>
			
		<td align="right" width="15%">
				是否货到付款:
			</td align="left">
			<td><input name="is_pay" id="is_pay" value="0" type="radio" <%if(is_pay.equals("0")) out.print("checked");%>/>是
				<input name="is_pay" id="is_pay" value="1" type="radio" <%if(is_pay.equals("1")) out.print("checked");%>/>否
				</td>
		<td align="right" width="15%">
				货到付款支付费:
			</td>
			<td width="20%"><input name="arrive_fare" id="arrive_fare" value="<%=arrive_fare%>" type="text" size="5" maxlength="5" onkeyup="if(isNaN(this.value))this.value='';else inputNoHorns(this)" onbeforepaste= "inputNoHorns(this); "/>元</td>
						
		<!-- 
			<td align="right" width="15%">
				到货区域:
			</td align="left">
			<td><input name="area_attr" id="area_attr" value="<%=area_attr%>" type="text" /></td>	
		 -->		
		</tr>
		
		<tr>
				
			<td align="right" width="15%">
				费用计算方式:
			</td align="left">
			<td colspan="3"><input name="cal_type" id="cal_type" value="0" type="radio" <%if(cal_type.equals("0")) out.print("checked");%>/>按重量计算
				<input name="cal_type" id="cal_type" value="1" type="radio" <%if(cal_type.equals("1")) out.print("checked");%>/>按商品件数计算
				</td>			
		</tr>
		
		<tr>
			<td align="right" width="15%">
				续重费用:
			</td>
			<td width="20%"><input name="con_fare" id="con_fare" value="<%=con_fare%>" type="text" size="5" maxlength="5" onkeyup="if(isNaN(this.value))this.value='';else inputNoHorns(this)" onbeforepaste= "inputNoHorns(this); "/>元</td>
			<td align="right" width="15%">
				首重费用:
			</td align="left">
			<td><input name="first_fare" id="first_fare" value="<%=first_fare%>" type="text" size="5" maxlength="5" onkeyup="if(isNaN(this.value))this.value='';else inputNoHorns(this)" onbeforepaste= "inputNoHorns(this); "/>元</td>			
		</tr>
		
		<tr>
			<td align="right" width="15%">
				单件商品费用:
			</td>
			<td ><input name="one_fare" id="one_fare" value="<%=one_fare%>" type="text" size="5" maxlength="5" onkeyup="if(isNaN(this.value))this.value='';else inputNoHorns(this)" onbeforepaste= "inputNoHorns(this); "/>元</td>
				<td align="right" width="15%">
				免费额度:
			</td align="left">
			<td><input name="free_fare" id="free_fare" value="<%=free_fare%>" type="text" size="5" maxlength="5" onkeyup="if(isNaN(this.value))this.value='';else inputNoHorns(this)" onbeforepaste= "inputNoHorns(this); "/>元</td>	
		</tr>
		
		<tr>
			<td align="right" width="15%">
				配送方式描述:
			</td>
			<td colspan="3"><textarea name="ship_desc" id="ship_desc" rows="3" cols="100" maxlength="300" onkeyup="if(isNaN(this.value))this.value='';else inputNoHorns(this)" onbeforepaste= "inputNoHorns(this); "/><%=ship_desc%></textarea></td>
		</tr>
				

	<input name="in_date" id="in_date" value="<%=in_date %>" type="hidden" />

		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="2567" />
	  			<input type="hidden" name="shipping_id" value="<%=shipping_id %>" />
				<input type="hidden" name="jumpurl" value="" />
				<input name="area_attr" id="area_attr" value="<%=area_attr%>" type="hidden" />
				<input type="submit" class="buttoncss" name="tradeSub" value="确定" onclick="return checkInfo();"/>
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='index.jsp';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
